<!DOCTYPE HTML">
<html>

<head>
    <title>101</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link href="css/style.css" rel="stylesheet" />
    <link href="css/core.css" rel="stylesheet" />
</head>

<body>
    <div id="header">
        <div id="top">
        </div>
        <div id="cnav">
            <div class="pr">
                <ul class="nav">
                    <li class="yun">
                        <a href="iframe/add.html " target="mainFrame "><em>首页</em></a></li>
                    <li><a href="http://news.baidu.com/ " target="mainFrame "><em>流水</em></a></li>
                    <li><a href="/discover/playlist " target="mainFrame "><em>统计</em></a></li>
                    <li><a href="/discover/djradio " target="mainFrame "><em>小工具</em></a></li>
                    <li><a href="/discover/artist " target="mainFrame "><em>分类</em></a></li>
                    <li><a href="/discover/album " target="mainFrame "><em>设置</em></a></li>
                </ul>

            </div>
        </div>
    </div>
    <div id="hbx">
        aa
    </div>
    <iframe id="mainFrame " name="mainFrame " scrolling="no" src="iframe/add.html " frameborder="0 " style="padding: 0px; width: 100%; height:700px;"></iframe>

</body>
<script type="text/javascript">
    startInit('mainFrame', 560);
    var browserVersion = window.navigator.userAgent.toUpperCase();
    var isOpera = browserVersion.indexOf("OPERA") > -1 ? true : false;
    var isFireFox = browserVersion.indexOf("FIREFOX") > -1 ? true : false;
    var isChrome = browserVersion.indexOf("CHROME") > -1 ? true : false;
    var isSafari = browserVersion.indexOf("SAFARI") > -1 ? true : false;
    var isIE = (!!window.ActiveXObject || "ActiveXObject" in window);
    var isIE9More = (!-[1, ] == false);

    function reinitIframe(iframeId, minHeight) {
        try {
            var iframe = document.getElementById(iframeId);
            var bHeight = 0;
            if (isChrome == false && isSafari == false)
                bHeight = iframe.contentWindow.document.body.scrollHeight;

            var dHeight = 0;
            if (isFireFox == true)
                dHeight = iframe.contentWindow.document.documentElement.offsetHeight + 2;
            else if (isIE == false && isOpera == false)
                dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
            else if (isIE == true && isIE9More) { //ie9+
                var heightDeviation = bHeight - eval("window.IE9MoreRealHeight" + iframeId);
                if (heightDeviation == 0) {
                    bHeight += 3;
                } else if (heightDeviation != 3) {
                    eval("window.IE9MoreRealHeight" + iframeId + "=" + bHeight);
                    bHeight += 3;
                }
            } else //ie[6-8]、OPERA
                bHeight += 3;

            var height = Math.max(bHeight, dHeight);
            if (height < minHeight) height = minHeight;
            iframe.style.height = height + "px";
        } catch (ex) {}
    }

    function startInit(iframeId, minHeight) {
        eval("window.IE9MoreRealHeight" + iframeId + "=0");
        window.setInterval("reinitIframe('" + iframeId + "'," + minHeight + ")", 100);
    } <
</script>

</html>